Dynomotion

Group: DynoMotion Message: 10769 From: juanitocincovivo Date: 1/4/2015
Subject: node.js bindings

Hey Tom,


I've been working on some c++ bindings to node.js/v8 extensions.  If I wanted to maintain the integration, how best to add my c++ project to the code base?


IS the Dyno code on Git?


Best,

Brad Murry

Group: DynoMotion Message: 10776 From: Tom Kerekes Date: 1/5/2015
Subject: Re: node.js bindings
Hi Brad,

I'm not sure the best approach. Our code isn't on Git.  Par Hannson started a branch for the Linux port on Git.

But I don't think it is yet functional - especially on Windows.

Could you explain the benefits of node.js/v8 to those of us that have no clue.  I assume it allows browsers to access to KMotion Libraries?  

Regards
TK


Group: DynoMotion Message: 10782 From: Juanito Cinco Date: 1/5/2015
Subject: Re: node.js bindings
Hello Tom,

A potential benefit to DynoMotion is the fact that it will open up the API to JavaScript developers, a similar benefit that happened when we made the .net bridge.  There are many, many more JavaScripters than there are .net'ers.

A v8::bindings would be great for many things, not just the ability to implement a presentation layer in a browser(which IMO would be huge).  Building a CLI (command line interface) like the picture I uploaded is one possibility (think of kicking off simple(perhaps non-cnc) operations from the command prompt or quickly loading config scripts, automated testing, etc...)

Certainly building a "Motion Server" would be where things begin to get interesting.  We could have a process running where multiple applications could connect(config screen, gcode HMI, tool path display, remote pendant on your phone or tablet, etc, etc...)

Once the bindings are complete I do indeed intend to build such a server that would expose KMotion functionality over restful services as well as a AMQP style message queue built on top of web sockets.  The next obvious step would be an HTML5 GUI that was easy to re-configure.

So the main point is being able to use JavaScript to control the device.  NodeJS is much more than HTTP.  Once the API bridge is built there is no reason a user could not build a straight TCP server or additionally connect to a serial port (or HTTP, TCP adn Serial in one application!!).

Sure, one can argue that all of this could be done in c++ or even .net but I'd have to say it would likely be simpler in node.

Think about the gaming industry- All the low level hardcore stuff like 3D graphics and physics engines are typically implemented in c/c++ and then things like building the story line and implementing character behavior is usually done in a scripting language like lua, python or JavaScript.

This offer some of the same goodness.  C/C++ where performance counts,  and then behavior can be easily scripted and changed as needed with no need to recompile.


Either way, I plan on finishing this at least for my own use.  I think it might appeal to some existing customers or attract new ones, plus it would be nice if it were always there for me to work on in new releases so it would be great to include it in the code base  ;)


-Brad


On Monday, January 5, 2015 12:07 PM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi Brad,

I'm not sure the best approach. Our code isn't on Git.  Par Hannson started a branch for the Linux port on Git.

But I don't think it is yet functional - especially on Windows.

Could you explain the benefits of node.js/v8 to those of us that have no clue.  I assume it allows browsers to access to KMotion Libraries?  

Regards
TK